import request from '@/utils/request'

export const DesignApi = {

    /**
     *  删除
     * @returns
     */
    deleteDesign: (designId) => {
        return request({
            url: '/manage/mall/design/deleteDesign',
            params: {designId},
            method: 'get'
        })
    },

    /**
     *  插入
     * @returns
     */
    addDesign: (data) => {
        return request({
            url: '/manage/mall/design/addDesign',
            data,
            method: 'post'
        })
    },

    /**
     *  更新
     * @returns
     */
    updateDesign: (data) => {
        return request({
            url: '/manage/mall/design/updateDesign',
            data,
            method: 'post'
        })
    },

    /**
     *  分页
     * @returns
     */
    getPage: (data) => {
        return request({
            url: '/manage/mall/design/getPage',
            data,
            method: 'post'
        })
    },

    /**
     *  修改排序
     * @returns
     */
    updateSort: (data) => {
        return request({
            url: '/manage/mall/design/updateSort',
            data,
            method: 'post'
        })
    },

    /**
     *  修改状态
     * @returns
     */
    updateStatus: (data) => {
        return request({
            url: '/manage/mall/design/updateStatus',
            data,
            method: 'post'
        })
    },

    /**
     *  获取分类下所有品牌
     * @returns
     */
    getBrandListByClassId: (classId) => {
        return request({
            url: '/manage/mall/design/getBrandListByClassId',
            params:{classId},
            method: 'get'
        })
    },

    /**
     *  获取所有系列
     * @returns
     */
    getAllList: (data) => {
        return request({
            url: '/manage/mall/design/getAllList',
            data,
            method: 'post'
        })
    }
}
